package main

import (
	"fmt"
	"goDemo/3.packageTowRun/greetings"
	"log"
)

func main() {
	message, error := greetings.HelloError("你好,调用包")
	if error != nil {
		//打印错误并停止程序
		log.Fatal("产生异常:" + error.Error())
	}

	fmt.Println(message)

	message, _ = greetings.HelloError("你好,调用包")
	fmt.Println("抛弃异常:" + message)
}
